/**
 * @(#)SecondActivity.java   2012-10-5
 * 
 * CopyRight (c) 2012-2020 TCL Digital Technology (shenzhen) CO.,Ltd. All rights reserved.
 * 
 * @description: 
 * 
 * @version: 1.0
 * 
 * @modification history:
 *     2012-10-5 Modified By zhaodm : Create
 * 
 * 
 */
package org.crazyit.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * @description: 
 * 
 */
public class SecondActivity extends Activity {


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.second_activity);
        
        Button previous = (Button)findViewById(R.id.secondButton);
        Button close = (Button)findViewById(R.id.closeme);
        
        previous.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(SecondActivity.this, MainActivity.class);
				startActivity(intent);
			}
        	
        });
        
        close.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(SecondActivity.this, MainActivity.class);
				startActivity(intent);
				finish();
			}
        	
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
